#ifndef SELECTS_H
#define SELECTS_H
#include "ado/stdafx.h"
#include <iostream>
#include <map>
#include <cstdarg>
#include "Database.h"
#include "public.h"
//#include "standard/nstring.h"


class ADOLIB1_API  Selects : public Database
{
public:
    static Selects *init(void *db);
    Selects(void *db);
    ~Selects();
    Selects *getColumns();
    Selects *find(const char *tokens, va_list vp);
    Selects *limit(int, ...);
    Selects *order(std::string);
    Selects *getOne();
    Selects *getAll();
    std::string createSql();
    std::map<std::string, std::string> query();
    std::map<unsigned long int, std::map<std::string, std::string> > querys();
    
private:
    std::string _classname;
    std::string _sort;
    std::string _limit;
    static Selects *_init;
    class CGarbo {public: ~CGarbo(){if (_init) delete _init;}};
    static CGarbo Garbo;  
};



#endif
